﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="SaleProcSrhForm.aspx.cs" ValidateRequest="false" Inherits="App_Search_SaleProcSrhForm"
    Title="销售过程查询" %>

<%@ Register Assembly="ShpmCommon" Namespace="Shpm.System.Web.Control" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="PanelNavigate" runat="server" />
    <cc1:ComValidator ID="comValidatSrh" runat="server" 
        Font-Bold="True" ForeColor="Red" CheckItems-Capacity="8" >
        <cc1:CheckLongAttribute Code="E0322" ControlToValidator="txtPersonId">
            <cc1:ComAbsParamsAttribute Parameter="客户编号" />
        </cc1:CheckLongAttribute>
        <cc1:CheckLongLessAttribute ControlToValidator="txtPersonId" Less="1000000000" Code="E0065">
            <cc1:ComAbsParamsAttribute Parameter="客户编号" />
            <cc1:ComAbsParamsAttribute Parameter="1" />
            <cc1:ComAbsParamsAttribute Parameter="999,999,999" />
        </cc1:CheckLongLessAttribute>
        <cc1:CheckLongMoreAttribute ControlToValidator="txtPersonId" More="1" Code="E0065">
            <cc1:ComAbsParamsAttribute Parameter="客户编号" />
            <cc1:ComAbsParamsAttribute Parameter="1" />
            <cc1:ComAbsParamsAttribute Parameter="999,999,999" />
        </cc1:CheckLongMoreAttribute>
        <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtBeginDate" DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="销售日期(开始)" />
        </cc1:CheckDateAttribute>
          <cc1:CheckDateAttribute Code="E0034" ControlToValidator="txtEndDate" DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="销售日期(结束)" />
        </cc1:CheckDateAttribute>      
        <cc1:CheckDateRangeAttribute Code="E0329" ControlToValidator1="txtBeginDate" ControlToValidator2="txtEndDate"
            DataFormat="yyyy/mm/dd">
            <cc1:ComAbsParamsAttribute Parameter="销售日期(开始)" />
            <cc1:ComAbsParamsAttribute Parameter="销售日期(结束)" />
        </cc1:CheckDateRangeAttribute>
    </cc1:ComValidator>    
    
    <table class="table_border_line">
        <tr>
            <td align="left" colspan="4">
            <script language="javascript">
                        (new TitleBar('SearchBar', '销售过程查询')).showBar();
                                    </script>
                </td>
        </tr>
    </table>
    <table class="table_border_line" style="background:ffffff">
        <tr>
            <td style="width: 20px;height: 24px;" valign="middle">
                &nbsp;</td>
            <td  class="list_data_bg_right" style="white-space: nowrap; width: 100px;height: 24px;" valign="middle">
                销售工号：</td>
            <td  class="list_data_bg_left" style="width: 600px; height: 24px;" valign="middle">
                &nbsp;
                <asp:TextBox id="txtEmployeeId" runat = "server" Width = "120px" MaxLength = 4 />&nbsp;
                                            <asp:Button ID="btnEmployeeId" runat="server" Text="选择员工" Width="85px" Visible="False" />
                &nbsp;
            </td>
            <td class="list_data_bg_left" rowspan="5" style="width: 247px height: 24px;" align="left" valign="middle">

        <table >
    <tr>
        <td align="center" colspan="2" style="height: 20px;" valign="middle">
            <strong class="GridView_item_center">&nbsp;客户意向程度统计</strong></td>
    </tr>
    <tr>
    <td align="right"  class="GridView_item_right" style="width: 150px; height: 20px;" >
        <asp:Label ID="lblXY5" runat="server"></asp:Label></td>
    <td align="left"  class="GridView_item_left" style="height: 20px; width: 110px;" colspan=""  >
        <asp:Label ID="lblCnt5" runat="server" ></asp:Label></td>
    </tr>
    <tr>
    <td align="right"  class="GridView_item_right" style="width: 150px;"  >
        <asp:Label ID="lblXY4" runat="server"></asp:Label></td>
    <td align="left"  class="GridView_item_left" style="height: 20px; width: 110px;"  >
        <asp:Label ID="lblCnt4" runat="server" ></asp:Label></td>
    </tr>
    <tr>
    <td align="right"  class="GridView_item_right" style="width: 150px; height: 20px;"  >
        <asp:Label ID="lblXY3" runat="server"></asp:Label></td>
    <td align="left"  class="GridView_item_left" style="width: 110px; height: 20px;"  >
        <asp:Label ID="lblCnt3" runat="server" ></asp:Label></td>
    </tr>
    <tr>
    <td align="right" class="GridView_item_right" style="width: 150px; height: 20px;"  >
        <asp:Label ID="lblXY2" runat="server"></asp:Label></td>
    <td align="left" class="GridView_item_left" style="width: 110px; height: 20px;"  >
        <asp:Label ID="lblCnt2" runat="server" ></asp:Label></td>
    </tr>
    <tr>
    <td align="right" class="GridView_item_right" style="width: 150px;"  >
        <asp:Label ID="lblXY1" runat="server"></asp:Label></td>
    <td align="left" class="GridView_item_left" style="width: 110px">
        <asp:Label ID="lblCnt1" runat="server" ></asp:Label></td>
    </tr>
    </table>
            <td class="list_data_bg_left" rowspan="6" style="width: 100px;height: 24px;">
            </td>
            <td rowspan="5" valign="middle" align="left" >
            
            </td>
        </tr>
        <tr>
            <td style="width: 20px; height: 24px;" valign="middle">
            </td>
            <td class="list_data_bg_right" style="width: 100px; white-space: nowrap; height: 24px;" valign="middle">
                客户姓名：</td>
            <td class="list_data_bg_left" style="width: 600px; height: 24px;" valign="middle">
                &nbsp;
                <asp:TextBox id="txtRelationName" runat = "server" Width = "120px" MaxLength="100" />
                （相似条件） &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 20px;height: 24px;" valign="middle">
                </td>
            <td  class="list_data_bg_right" style="white-space: nowrap; width: 100px;" valign="middle">
                意向程度：</td>
            <td  class="list_data_bg_left" style="width: 600px;height: 24px;" valign="middle">
                &nbsp;&nbsp;<asp:DropDownList ID="lstRelationIntent" runat="server" Width="120px" DataTextField="Content" DataValueField="DictNo">
                                            </asp:DropDownList></td>
        </tr>
        <tr>
            <td style="width: 20px;height: 24px;" valign="middle">
            </td>
            <td class="list_data_bg_right" style="width: 100px;height: 24px;; white-space: nowrap" valign="middle">
                销售日期：</td>
            <td class="list_data_bg_left" style="width: 600px;height: 24px;" valign="middle">
                &nbsp;
                <asp:TextBox id="txtBeginDate" runat = "server" Width = "120px" MaxLength="10" onfocus="new Calendar().show(this);"/>&nbsp;
                ～
                <asp:TextBox id="txtEndDate" runat = "server" Width = "120px" MaxLength="10" onfocus="new Calendar().show(this);"/>&nbsp; （格式：yyyy/MM/dd）</td>
        </tr>
        <tr>
            <td style="width: 20px; height: 17px;" valign="middle">
                </td>
            <td style="width: 100px; height: 17px;" valign="middle">
            </td>
            <td align="left" style="width: 600px; height: 17px;" valign="middle">
            <center>
                <asp:Button ID="btnSearch" runat="server" Text="查询" Width="85px"
                                        OnClick="btnSearch_Click" CssClass="button1" Height="25px" />
                                        &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<asp:Button ID="btnBack" runat="server" Text="返回" Width="85px" OnClick="btnBack_Click" CssClass="button1" Height="25px" />
            
            </center>
            </td>
        </tr>
        <tr style ="display:none;">
            <td style="width: 20px">
            </td>
            <td style="width: 100px; height: 25px;">
            </td>
            <td align="left" style="width: 600px; height: 25px;">
                <asp:DropDownList ID="lstSaleStatus" runat="server" Width="120px" Visible = "false">
                                                <asp:ListItem></asp:ListItem>
                                                <asp:ListItem Value="0">未洽谈</asp:ListItem>
                                                <asp:ListItem Value="1">洽谈中</asp:ListItem>
                                                <asp:ListItem Value="2">洽谈成功</asp:ListItem>
                                            </asp:DropDownList><asp:DropDownList ID="lstSaleStep" runat="server" Width="120px" Visible="False">
                                                <asp:ListItem></asp:ListItem>
                                                <asp:ListItem Value="0">尚未开始</asp:ListItem>
                                                <asp:ListItem Value="1">入会登记</asp:ListItem>
                                                <asp:ListItem Value="2">体检报告</asp:ListItem>
                                                <asp:ListItem Value="3">资格审核</asp:ListItem>
                                                <asp:ListItem Value="4">合同签订</asp:ListItem>
                                                <asp:ListItem Value="5">费用缴纳</asp:ListItem>
                                                <asp:ListItem Value="6">礼品发放</asp:ListItem>
                                            </asp:DropDownList>
                &nbsp; &nbsp;
                &nbsp; &nbsp;&nbsp;
                客户编号&nbsp;
            </td>
            <td class="list_data_bg_left" rowspan="1" style="width: 247px; height: 25px;">
                &nbsp;<asp:TextBox id="txtPersonId" runat = "server" CssClass = "default" Width = "120px" MaxLength="8" />
                                            <asp:Button ID="btnPersonId" runat="server" Text="选择客户" Width="66px" Visible="False" /></td>
        </tr>
        <!--tr>
            <td style="width: 20px">
                &nbsp;</td>
            <td align="left" style="white-space: nowrap">
                </td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 20px; height: 1px;">
            </td>
            <td align="left" style="white-space: nowrap; height: 1px;">
                </td>
            <td align="left" style="height: 1px">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 20px; height: 15px;">
            </td>
            <td align="left" style="white-space: nowrap; height: 15px;">
                </td>
            <td align="left" style="height: 15px">
                &nbsp;</td>
        </tr-->
    </table>

        <table id="tblResult" width="100%" runat="server" visible="false">
            <tr>
                <td align="left">
                <script language="javascript">
                        (new TitleBar('SearchBar1', '销售过程查询结果')).showBar();
                                    </script>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <center>
                        <asp:GridView ID="viewSrhRst" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="GridView_table"
                            DataKeyNames="SaleProcId" OnPageIndexChanging="viewSrhRst_PageIndexChanging" OnRowDataBound="viewSrhRst_RowDataBound" Width="97%" PageSize="25">
                            <Columns>
                                <asp:BoundField HeaderText="销售过程编号" DataField="SaleProcId" Visible="False">
                                    <HeaderStyle CssClass="GridView_head_grayblue" Width="0px" />
                                    <ItemStyle CssClass="GridView_item_center" />
                                </asp:BoundField>                            
                                <asp:BoundField HeaderText="销售状态" DataField="SaleStatus" Visible="False">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>                                                                                         
                                            
                                <asp:BoundField HeaderText="员工姓名" DataField="EmployeeName">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>                                                                
                                <asp:BoundField HeaderText="客户姓名" DataField="RelationName">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>                                                                
                                <asp:BoundField HeaderText="当前状态">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>                                                                
                                <asp:BoundField HeaderText="意向程度" DataField="relationintent">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="登记时间" DataField="NewDate" DataFormatString="{0:yyyy/MM/dd}" HtmlEncode="False">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:BoundField HeaderText="回访时间" DataField="VisiteDate" DataFormatString="{0:yyyy/MM/dd}" HtmlEncode="False">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>                             
                                <asp:BoundField HeaderText="洽谈次数" DataField="VisiteNum">
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="详细信息">                                
                                    <ItemTemplate>
                                        <asp:LinkButton ID="step0" runat="server" CommandName="Step0" OnCommand="LinkButton_Command" Text="详细" Enabled = "true" ></asp:LinkButton>
                                        <asp:LinkButton ID="Step1" runat="server" CommandName="Step1" OnCommand="LinkButton_Command" Text="销售记录" Enabled = "false" Visible = "false"></asp:LinkButton>
                                        <asp:LinkButton ID="Step2" runat="server" CommandName="Step2" OnCommand="LinkButton_Command" Text="体检" Enabled = "false" Visible = "false" ></asp:LinkButton>
                                        <asp:LinkButton ID="Step3" runat="server" CommandName="Step3" OnCommand="LinkButton_Command" Text="提交审核" Enabled = "false" Visible = "false"></asp:LinkButton>
                                        <asp:LinkButton ID="Step4" runat="server" CommandName="Step4" OnCommand="LinkButton_Command" Text="签订合同" Enabled = "false" Visible = "false"></asp:LinkButton>                                    
                                        <asp:LinkButton ID="Step5" runat="server" CommandName="Step5" OnCommand="LinkButton_Command" Text="财务收费" Enabled = "false" Visible = "false"></asp:LinkButton>                                    
                                        <asp:LinkButton ID="Step6" runat="server" CommandName="Step6" OnCommand="LinkButton_Command" Text="移交资料" Enabled = "false" Visible = "false" ></asp:LinkButton>                                    
                                    </ItemTemplate>      
                                    <ItemStyle CssClass="GridView_item_center" />
                                    <HeaderStyle CssClass="GridView_head_grayblue" />
                                </asp:TemplateField>
                            </Columns>
                            <PagerStyle HorizontalAlign="Right" />
                        </asp:GridView>
                    </center>          
                    
                 </td>
            </tr>            
        </table>
    <br />
</asp:Content>
